package org.finesys.ai.constants;

import lombok.Getter;

import java.util.Arrays;

/**
 * 模型类型
 */
@Getter
public enum ModelTypeEnum {

    CHAT("chat"),
    IMAGE("image"),
    Embedding("embedding"),
    ;

    private String name;


    private ModelTypeEnum(String name) {
        this.name = name;
    }

    /**
     * 获取enum对象
     */
    public static ModelTypeEnum getEnum(String name) {
        return Arrays.stream(ModelTypeEnum.values()).filter(model -> model.getName().equals(name)).findFirst().orElse(null);
    }
}
